extends ./index.jade

block content
	.rightSide
		.container-fluid
			.row
				a#add_master.btn.btn-primary.col-sm-1.managerOnly(role='button' href='/views/add_master.html') 新增堂主
				#tips.h4.text-danger.col-sm-4 查询中，请稍候
			.row
				table#masterList.table.table-bordered.table-hover.center
					thead
						th 序号
						th 堂主账号
						th 堂主姓名
						th 性别
						th 电话
						th 邮箱
						th 学校
						th.managerOnly 操作
					tbody#master
			.row.text-right.forcedVerticalCenter
				span 
					|共
					span#total
					|条记录
				#paginator.paginator

	script#template_master(type='text/dot-tpl')
		|{{~it:value:index}}
		tr(id='{{=value.id}}')
			td {{=index+1}}
			td {{=value.account}}
			td {{=value.name}}
			|{{?value.gender=='2'}}
			td 女
			|{{??}}
			td 男
			|{{?}}
			td {{=value.phone}}
			td {{=value.email}}
			td {{=value.school_name}}
			td.managerOnly
				a.btn.btn-primary(role='button' data-target='{{=value.id}}' onclick='myFun.deleteMaster(this)') 删除
				a.btn.btn-default(role='button' data-target='{{=value.id}}' onclick='myFun.changeMaster(this)') 修改
		|{{~}}

	script(src='/js/lib/require.js' data-main='/js/master')